class CreateAssignments < ActiveRecord::Migration
  def self.up
    create_table :assignments do |t|
      t.integer "user_id"
      t.integer "role_id"

      t.timestamps
    end

    add_foreign_key(:assignments, :users, :column => :user_id)
    add_foreign_key(:assignments, :roles, :column => :role_id)
  end

  def self.down
    drop_table :assignments
  end
end
